import request from '@/utils/request'

// 查询店铺公告列表
export function listNotice(query) {
  return request({
    url: '/work/noticshop/list',
    method: 'get',
    params: query
  })
}

// 查询店铺公告详细
export function getNotice(id) {
  return request({
    url: '/work/noticshop/' + id,
    method: 'get'
  })
}

// 新增店铺公告
export function addNotice(data) {
  return request({
    url: '/work/noticshop/saveOrUpdate',
    method: 'post',
    data: data
  })
}

// 修改店铺公告
export function updateNotice(data) {
  return request({
    url: '/work/noticshop/saveOrUpdate',
    method: 'post',
    data: data
  })
}

// 删除店铺公告
export function delNotice(id) {
  return request({
    url: '/work/noticshop/delete-by-id',
    method: 'get',
    params: { "id": id }
  })
}

export function delNotices(ids) {
  return request({
    url: '/work/noticshop/delete-by-ids',
    method: 'get',
    params: { "ids": ids }
  })
}